//
//  LJRequestData.h
//  requestData
//
//  Created by MyMac on 15/8/7.
//  Copyright (c) 2015年 MyMac. All rights reserved.
//

#import <UIKit/UIKit.h>
typedef void(^DataCall) (id data);
@interface LJRequestData : NSObject
/**
 *  AF的POST请求
 *
 *  @param url     url地址
 *  @param param   参数体
 *  @param success 请求成功回调
 *  @param failed  请求失败回调
 */
+(void)afPostdataUrl:(NSString*)url andparam:(id)param finishedBlock:(void(^)(id complete))success failedBolck:(void(^)(id failed))failed;
/**
 *  AF的GET请求
 *
 *  @param url     url地址
 *  @param success 请求成功的回调
 *  @param failed  请求失败的回调
 */
+(void)afGETRequestUrl:(NSString*)url andFinishedBlock:(void(^)(id complete))success andfailedBlock:(void(^)(id failed))failed;
/**
 *  GET的同步请求
 *
 *  @param url url地址
 *
 *  @return 返回结果
 */
+(NSURLResponse*)requestfileResponse:(NSString*)url;
/**
 *  下载文件
 *
 *  @param url     url地址
 *  @param name    文件名，可不填
 *  @param type    文件类型（必填）
 *  @param success 成功的回调
 *  @param failed  失败的回调
 */
+(void)requestDownDataUrl:(NSString*)url andfileName:(NSString*)name andfileType:(NSString*)type andfinishedBlock:(void(^)(id complete))success andfailed:(void(^)(id failed))failed;

-(void)systemHTTPSRequest:(DataCall)data;

@end
